package kr.co.mcshop.qnareply;

import java.util.ArrayList;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class QnAReplyService {

	@Autowired
	private SqlSession sqlSession;

	public ArrayList<QnAReply> selectreply(Integer comment_no) {
		QnAReplyMapper mapper = sqlSession.getMapper(QnAReplyMapper.class);
		return mapper.selectreply(comment_no);
	}

	public int replyInsert(Map map) {
		QnAReplyMapper mapper = sqlSession.getMapper(QnAReplyMapper.class);
		return mapper.replyInsert(map);
	}

	public int updateqnareply(Map map) {
		QnAReplyMapper mapper = sqlSession.getMapper(QnAReplyMapper.class);
		return mapper.updateqnareply(map);
	}

	public int qnareplyDelete(Map map) {
		QnAReplyMapper mapper = sqlSession.getMapper(QnAReplyMapper.class);
		return mapper.qnareplyDelete(map);
	}

	public int FAQreplyDelete(Map map) {
		QnAReplyMapper mapper = sqlSession.getMapper(QnAReplyMapper.class);
		return mapper.FAQreplyDelete(map);
	}

	public int faqreplyDelete(Map map) {
		QnAReplyMapper mapper = sqlSession.getMapper(QnAReplyMapper.class);
		return mapper.faqreplyDelete(map);
	}

	public int replyDelete(Map map) {
		QnAReplyMapper mapper = sqlSession.getMapper(QnAReplyMapper.class);
		return mapper.replyDelete(map);
	}
}
